package com.ysd.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ysd.model.Users;
import com.ysd.service.IUsersService;

@Controller
public class UsersController {
	
	@Resource
	private IUsersService usersService;
	
	@RequestMapping("login")
	public String login(Users user) {
		Users u =  usersService.login(user);
		if(u!=null) {
			return "index";
		}else {
			return "login";
		}
	}
}
